 #ifndef TRACKBALLCAMERA_H
 #define TRACKBALLCAMERA_H

#include <QGLWidget>
#include "vector3d.h"

class TrackBallCamera : public QGLWidget
{
public:
    TrackBallCamera();

    virtual void look();
	
	void setrotationSensibilite(int sensiblilite);

	void setfree(bool fri);

	void setangleX(double angle);
	void setangleY(double angle);
	void setangleZ(double angle);

	void setpositionCamX(double pos);
	void setpositionCamY(double pos);
	void setpositionCamZ(double pos);

	void settheta(double t);
	void setphi(double phi);

	void setdistance(double dist);

	bool getfree();

	double getangleX();
	double getangleY();
	double getangleZ();

	double getpositioncamX();
	double getpositioncamY();
	double getpositioncamZ();
	double gettheta();
	double getphi();

	double getdistance();
	void VectorsFromAngles();
	void deplacementVerticalFreeCam(int i);
	void deplacementHorizontalFreeCam(int i);

	void setCamera();//on change de mode

protected:
    int _rotationSensibilite; //plus elle est basse, plus c'est rapide.
    double _scrollSensibilty;
	

	bool _free;

	Vector3D _position;
    Vector3D _target;
    Vector3D _forward;
    Vector3D _left;

    double _theta;
    double _phi;
	
   
    double _distance;
    double _angleX;
	double _angleY;
	double _angleZ;


	double _positionCamX;
	double _positionCamY;
	double _positionCamZ;
};
#endif